package flc.ast.fragment;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.blankj.utilcode.util.ConvertUtils;
import com.stark.riddle.lib.RiddleModule;

import flc.ast.R;
import flc.ast.activity.RiddleActivity;
import flc.ast.activity.SayingActivity;
import flc.ast.activity.TwisterActivity;
import flc.ast.databinding.FragmentChallengeBinding;
import stark.common.basic.base.BaseNoModelFragment;
import stark.common.basic.event.EventStatProxy;

/**
 * A simple {@link Fragment} subclass.
 * Use the {@link ChallengeFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class ChallengeFragment extends BaseNoModelFragment<FragmentChallengeBinding> {


    @Override
    protected int onCreate() {
        return R.layout.fragment_challenge;
    }

    @Override
    protected void initView() {
        EventStatProxy.getInstance().statEvent1(getActivity(), mDataBinding.event1Container);
        EventStatProxy.getInstance().statEvent5(getActivity(), mDataBinding.event5Container);
        mDataBinding.rlTwister.setOnClickListener(this);
        mDataBinding.rlRiddle.setOnClickListener(this);
        mDataBinding.rlSaying.setOnClickListener(this);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()) {
            case R.id.rlTwister://脑筋急转弯
                startActivity(TwisterActivity.class);
                break;
            case R.id.rlRiddle://猜谜语
                startActivity(RiddleActivity.class);
                break;
            case R.id.rlSaying://歇后语
                startActivity(SayingActivity.class);
                break;
        }
    }

    @Override
    protected void initData() {

    }

}